import { mysqlParser } from "./mysql";

// eslint-disable-next-line no-restricted-globals
const ctx: Worker = self as any;
ctx.onmessage = (event) => {
  try {
    ctx.postMessage(mysqlParser(event.data.text, event.data.index));
  } catch (e) {
    console.log(e);
  }
};
